var longurlpleaseoptions = {
  globalEnable : null,
  expandStyle : null,
  rerunOption : null,
  init : function(){
    longurlpleaseoptions.globalEnable = document.getElementById("expandenabled");
    longurlpleaseoptions.expandStyle = document.getElementById("expandstyle");
    longurlpleaseoptions.globalEnable.addEventListener("command", longurlpleaseoptions.toggleOptions, false);
    longurlpleaseoptions.toggleOptions();
  },
  toggleOptions : function(){
    longurlpleaseoptions.expandStyle.disabled  = !longurlpleaseoptions.globalEnable.checked
  }
}

window.addEventListener("load", longurlpleaseoptions.init, false);